package com.dd.stack.kafka.common.pojo.convertor;

import com.dd.stack.kafka.common.pojo.BO.JsonUserBO;
import com.dd.stack.kafka.common.pojo.req.ProducerSendJsonUserReq;
import org.springframework.beans.BeanUtils;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/6/15 9:18
 * @Description POJO转换器
 */
public class JsonUserConvertor {

    /**
     * 将ProducerSendJsonUserReq对象转换为JsonUserBO对象
     * @param req
     * @return
     */
    public static JsonUserBO convert2JsonUserBO(ProducerSendJsonUserReq req) {
        JsonUserBO jsonUserBO = new JsonUserBO();
        BeanUtils.copyProperties(req, jsonUserBO);
        return jsonUserBO;
    }
}
